package cn.xo68.boot.web.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties("wuxie.web")
public class WebCoreProperties {

    /**
     * 是否启用restful json包装输出
     */
    private boolean enabledJsonWapper= true;

    private String systemErrorRedirtPath ="/error/sys";

    /**
     * 错误页面的模板名称，默认：error/index
     */
    private String errorViewName="error/index";

    /**
     * 是否在错误页面系统的异常提示，默认不显示，直接显示自定义的错误信息
     */
    private boolean showSystemError =false;

    private String errorTitle = "页面出错了";

    private String errorMessage ="系统繁忙或异常，请稍后访问";



    public boolean isEnabledJsonWapper() {
        return enabledJsonWapper;
    }

    public void setEnabledJsonWapper(boolean enabledJsonWapper) {
        this.enabledJsonWapper = enabledJsonWapper;
    }

    public String getSystemErrorRedirtPath() {
        return systemErrorRedirtPath;
    }

    public void setSystemErrorRedirtPath(String systemErrorRedirtPath) {
        this.systemErrorRedirtPath = systemErrorRedirtPath;
    }

    public String getErrorViewName() {
        return errorViewName;
    }

    public void setErrorViewName(String errorViewName) {
        this.errorViewName = errorViewName;
    }

    public boolean isShowSystemError() {
        return showSystemError;
    }

    public void setShowSystemError(boolean showSystemError) {
        this.showSystemError = showSystemError;
    }

    public String getErrorTitle() {
        return errorTitle;
    }

    public void setErrorTitle(String errorTitle) {
        this.errorTitle = errorTitle;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
}
